applicationwindow: Use gtk_widget_measure to measure widget sizes
authorTimm Bäder <mail@baedert.org>
Sat, 4 Mar 2017 07:18:21 +0000 (08:18 +0100)
committerTimm Bäder <mail@baedert.org>
Sat, 4 Mar 2017 07:44:49 +0000 (08:44 +0100)
gtk/gtkapplicationwindow.c

index eab010764cbac660fe111d0ef79d4cd9cd0cb2fd..b068074bc7c679b12e9d9dc25cbd787f8fed5481 100644 (file)
@@ -609,9 +609,9 @@ gtk_application_window_real_size_allocate (GtkWidget     *widget,
       _gtk_window_set_allocation (GTK_WINDOW (widget), allocation, &child_allocation);
       menubar_allocation = child_allocation;
 
-      gtk_widget_get_preferred_height_for_width (window->priv->menubar,
-                                                 menubar_allocation.width,
-                                                 &menubar_height, NULL);
+      gtk_widget_measure (window->priv->menubar, GTK_ORIENTATION_VERTICAL,
+                          menubar_allocation.width,
+                          &menubar_height, NULL, NULL, NULL);
 
       menubar_allocation.height = menubar_height;
       gtk_widget_size_allocate (window->priv->menubar, &menubar_allocation);